﻿import { a } from 'vite/dist/node/types.d-aGj9QkWt';
import request from '/@/utils/request';
enum Api {
  AddEtQuestionCate = '/api/etQuestionCate/add',
  DeleteEtQuestionCate = '/api/etQuestionCate/delete',
  UpdateEtQuestionCate = '/api/etQuestionCate/update',
  PageEtQuestionCate = '/api/etQuestionCate/page',
  DetailEtQuestionCate = '/api/etQuestionCate/detail',
  GetEtQuestionCateTree = '/api/etQuestionCate/EtQuestionCateTree',
  ListEtQuestionCate = '/api/etQuestionCate/list',
}

// 增加题目分类
export const addEtQuestionCate = (params?: any) =>
	request({
		url: Api.AddEtQuestionCate,
		method: 'post',
		data: params,
	});

// 删除题目分类
export const deleteEtQuestionCate = (params?: any) => 
	request({
			url: Api.DeleteEtQuestionCate,
			method: 'post',
			data: params,
		});

// 编辑题目分类
export const updateEtQuestionCate = (params?: any) => 
	request({
			url: Api.UpdateEtQuestionCate,
			method: 'post',
			data: params,
		});

// 分页查询题目分类
export const pageEtQuestionCate = (params?: any) => 
	request({
			url: Api.PageEtQuestionCate,
			method: 'post',
			data: params,
		});

// 详情题目分类
export const detailEtQuestionCate = (id: any) => 
	request({
			url: Api.DetailEtQuestionCate,
			method: 'get',
			data: { id },
		});

// 获取题目分类树
export const getEtQuestionCateTree = (questionBankId: number) => 
	request({
		url: Api.GetEtQuestionCateTree,
		method: 'get',
		params: { questionBankId }
	});

// 获取题目分类列表
export const listEtQuestionCate = (params?: any) =>
	request({
		url: Api.ListEtQuestionCate,
		method: 'get',
		params,
	});

